<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt"%>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet"
			type="text/css" />
		<script language="javascript" src="<%=path%>/js/util.js"></script>
		<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
		<script language="javascript"
			src="<%=path%>/application/js/treeSelect.js"></script>
	</head>
	<body>
		<div id="divTree"
			style="position: absolute; background: #FFFFFF; left: 1px; top: 1px; height =250; width: 253px; display: none"></div>
		<html:form styleId="meetingForm" action="updateMeeting.do?method=updateMeeting"
			onsubmit="return save();">
			<input type ="hidden" name="id" id="id" value="${meeting.id}"/>
			<input type ="hidden" name="projectid" id="projectid" value="${meeting.projectNo}"/>
			<table cellspacing="0" cellpadding="0" width="98%" align="center"
				border="0" class="margtb5">
				<tr>
					<td align="left" class="padl5 lan12">
						<img src="<%=path%>/images/img-11.gif" width="12" height="12">
						研发辅助 &gt; 项目会议管理 &gt; 编辑
					</td>
				</tr>
			</table>


			
			<table cellspacing="1" cellpadding="0" width="98%" align="center"
				border="0" class="bgcolor2 margb5">

				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.name"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="name" name="name" flag="true"
							valid="required" errMsg="请输入会议记录！" size="30"  value="${meeting.name}"/>
						<font color="red">*</font>

					</td>
					
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.pname"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" flag="true"  maxlength="60"  value="${meeting.projectName}"   id="projectName" name="projectName" readonly="true" />  
						<input type="button" onclick="chooseProject();" name="choose"   value="选择" class="buttonbg" style="cursor:hand"/>
						<font color="red">*</font>

					</td>
				</tr>
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.pid"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="projectNo" name="projectNo" value="${meeting.projectNo}"  size="30" />
					</td>
					
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.org"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13">${meeting.projectOrg}
						<ssh:select readonly="true" id="projectOrg" propertyName="projectOrg" firstShow="Y" dataSource="collection" selectList="${orgSelect}"  type="1" defaultName="${meeting.projectOrg}" />	
						
						</td>
				</tr>
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.zman"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<input type="text" id="zman" name="zman"  readonly="readonly"  size="30"  value="${meeting.zman}" 
						onClick="openTree('divTree','user_bm_o','${pageContext.request.contextPath}/common/treeSelect.jsp?iid=zmanid&iname=zman',this)"/>
						<input type="hidden" id="zmanid" name="zmanid" value=""  size="30"   />
						<input type="hidden" id="operateid" name="operateid" value="${sessionScope.loginUser.id}"  size="30" />
					</td>
					<td width="18%" align="right" class="zi13">
						召开时间
						：</td>
					<td width="32%" align="left" class="pad2 zi13">
					<input type="text" name="zkdate"  value="${meeting.zkdate}"   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',disabledDates:['%y-%M-%d #{%H-1}\:..\:..','%y-%M-%d #{%H+1}\:..\:..']})" flag="true" valid="required" errMsg="请选择召开时间！"/>
					</td>
				</tr>
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.cmans"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13">
						<textarea rows="2" cols="40" id="cmans" name="cmans" flag="true" valid="required" errMsg="请选择参会人员！" readonly="readonly"
						onClick="openTree('divTree','user_bm_n','${pageContext.request.contextPath}/common/treeSelect.jsp?iid=cmansid&iname=cmans',this)"
						>${meeting.cmans} </textarea>
						<input type="hidden" id="cmansid" name="cmansid" value=""  size="30" />
					</td>
				<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.address"
							bundle="meetingKey" />
						：</td>
					<td width="32%" align="left" class="pad2 zi13">
					<input type="text" value="${meeting.address}" size="30" name="address" flag="true" valid="required" errMsg="请输入会议地址！"/>
					</td>
				</tr>
									
				<tr class="bgcolor">
					<td width="18%" align="right" class="zi13">
						<bean:message
							key="com.application.meeting.entity.meeting.createpage.info"
							bundle="meetingKey" />
						：
					</td>
					<td width="32%" align="left" class="pad2 zi13" colspan="3">
					<textarea rows="5" cols="100" id="info" name="info" >${meeting.info}</textarea>
					</td>
				</tr>
			</table>
            <iframe width="100%" height="150px" onload="this.height=show_attachment.document.body.scrollHeight"
							src="<%=path%>/queryAttachment.do?method=queryAttachment&fid=${meeting.id}&type=13001"
											; scrolling="no" frameborder="0" name="show_attachment"
											id="show_attachment"></iframe>


			<p>
			<p>
			<p>
			<table width="98%" align="center" border="0" cellspacing="0"
				cellpadding="0">
				<tr>
					<td align="center">
						<input class="buttonbg" id="but_save" type="submit"
							style="cursor: hand"
							value="<bean:message key='com.manager.common.meeting.save' bundle="meetingKey"/>"
							name="but_save" />
						&nbsp;&nbsp;&nbsp;
						<input class="buttonbg" id="but_return" type="button"
							style="cursor: hand"
							value="<bean:message key='com.manager.common.meeting.return' bundle="meetingKey"/>"
							name="but_return" onClick="javascript:history.go(-1);" />
					</td>
				</tr>
			</table>

		</html:form>
	</body>
</html>


<script>

function save(){
   if(validateForm(document.forms[0],'Y'))
   {
	return true;
    }else{
	return false;
    }
}

function chooseProject(){   
    var syncHelper = new SyncHelper();
    <c:if test="${loginUser.roleType==3}">
        var url = "popuSelectProjectList.do?method=popuSelectProjectList&type=1&random=" + new Date();
    </c:if>
	<c:if test="${loginUser.roleType!=3}">
        var url = "popuSelectProjectList.do?method=popuSelectProjectList&org=${loginUser.oid}&random=" + new Date();
    </c:if>
	
	var searchWin = window.showModalDialog(url,window,"help:no;scroll:yes;resizable:no;status:0;dialogWidth:1000px;dialogHeight:600px;center:yes" ); 	
    if(searchWin){
         $("projectName").value = searchWin["projectName"]==undefined?"":searchWin["projectName"];
		 $("projectNo").value = searchWin["projectNo"]==undefined?"":searchWin["projectNo"];
		 syncHelper.selectedByValue(searchWin["projectOrg"],"projectOrg");
		
		 
		 //$jq("#projectOrg option").not(":selected").attr("disabled", "disabled");

		 
    }
}
</script>





